#ifndef ROTATEIMG_H
#define ROTATEIMG_H
#include <QObject>
#include <iostream>
#include <vector>
#include "splitImgToPt.h"

using namespace cv;
using namespace std;
class RotateImg : public QObject
{
    Q_OBJECT
public:
    explicit RotateImg(QObject *parent = nullptr);
    std::vector<vector<cv::Point>> pointArr;
    std::vector<vector<cv::Point>> rotatedpointArr;
    int idx;
public:
    RotateImg(std::vector<vector<cv::Point>> pArr)
        : idx(0), pointArr(pArr), rotatedpointArr(std::vector<vector<cv::Point>>(6, vector<Point>(5)))
    {}
    void transFormImg(string &imgPath, double angle);


    std::vector<vector<cv::Point>> getFivePoint()
    {
        return rotatedpointArr;
    }
private:
    void addRotatedPoint(Mat &M);
};
#endif // ROTATEIMG_H
